<?php		
			if (isset($csn) && $csn<>''){
				$pdsql="select * from category where sn='$csn'";
				$pdres=mysql_query($pdsql,$db);
				$pdrw=mysql_num_rows($pdres);
				if ($pdrw>0){
					$pdr=mysql_fetch_array($pdres);
					if ($csn == 8){
						$catname = "Antibody";
						$cname = "$catname";
					}else{
						$catname = $pdr['cname'];
						$cname = "$catname";
						$cname = strip_tags($cname);
						if(!isset($ssn)){
						switch ($csn){
							case 12:
								$cname .= " ($40.00)";
								break;
							case 13:
								$cname .= " ($105.00)";
							case 14:
								$cname .= " ($135.00)";
								break;
							case 15:
								$cname .= " ($675.00)";
								break;
							case 20:
								$cname .= " ($42.00)";
								break;
							case 22:
								$cname .= " ($25.00)";
								break;
							case 17:
							case 18:
								$cname .= " ($95.00)";
								break;
							case 16:
								$cname .= " ($85.00)";
								break;
							case 19:
								//get lowest price from table prodsecondanti
								$scnd = "select price from prodsecondanti order by price";
								$scnd_res = mysql_query($scnd,$db);
								$scnd_r = mysql_fetch_array($scnd_res);
								$scnd_low = $scnd_r['price'];
								$cname .= " ($".$scnd_low.")";
								break;
							case 21:
								$cname .= " ($35.00)";
								break;
							case 23:
								$cname .= " ($65.00)";
								break;
							case 25:
								$cname .= " ($450.00)";
								break;
							case 29:
								$cname .= " ($0.00)";
								break;
							case 30:
								$cname .= " ($350.00)";
								break;
							case 43:
								$cname .= " ($625.00)";
								break;
							case 44:
								$cname .= " ($55.00)";
								break;
							case 45:
								$cname .= " ($1350.00)";
								break;
						}
						}
					}
				}
			}else{$cname='';}
					
			if (isset($ssn)){
				if ($csn == "9" || $csn == "10" || $csn == "11" || $csn == "53" || $csn == "54" || $csn == "55" || $csn == "56"){
					$pdsql="select * from subcat where csn='8' and sn='$ssn'";
					switch($csn){
						case 9:	
							//start: get lowest price
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'siRNA'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select price from prodsirna where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
							//end: get lowest price
							
							$extra=' siRNA/shRNA/RNAi Lentivector';
							$extras=' ($'.$lowestpc.')';
							$pre='siRNA/shRNA/RNAi Lentiviral Vectors ';
							break;
						case 10:
							//start: get lowest price
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'Lentivirus'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select price from prodlenti where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
							//end: get lowest price
							
							$extra=' Lentiviral Vector';
							$extras=' ($'.$lowestpc.')';
							$pre='Lentiviral Vectors ';
							break;
						case 11: 
							//start: get lowest price
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'Adenovirus'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select price from prodadenovirus where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
							//end: get lowest price
							
							$extra=' Adenovirus';
							$extras=' ($'.$lowestpc.')';
							$pre='Adenoviruses ';
							break;
						case 53:
							//start: get lowest price
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'Protein Vectors'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select price from prodProteinVector where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
							//end: get lowest price
							
							$extra=' Protein Vector';
							$extras=' ($'.$lowestpc.')';
							$pre='Protein Vectors ';
							break;
						case 54:
							//start: get lowest price
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'ORF Vectors'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select price from prodORFVector where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
							//end: get lowest price
							
							$extra=' ORF Vector';
							$extras=' ($'.$lowestpc.')';
							$pre='ORF Vectors ';
							break;
						case 55:
							//start: get lowest price
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'Recombinant Proteins'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select price from prodprotein where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
							//end: get lowest price
							
							$extra=' Recombinant Proteins';
							$extras=' ($'.$lowestpc.')';
							$pre='Recombinant Proteins ';
							break;
						case 56:
							//start: get lowest price
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'Protein Lysates'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select price from prodlysates where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
							//end: get lowest price
							
							$extra=' Protein Lysate';
							$extras=' ($'.$lowestpc.')';
							$pre='Protein Lysates ';
							break;
					}
				}else{
					if($csn==8 || $csn == 17 || $csn == 18){
						//start: get lowest price
						if ($csn == 8){
							$pdsql="select * from subcat where csn='$csn' and sn='$ssn'";
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'Antibodies'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select price from products where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
						}else{
							$pdsql="select * from subcat where csn='$csn' and sn='$ssn'";
							$lowestpc = "95.00";
						}
						//end: get lowest price
						
						$pre='Antibodies ';
						$extra=' Antibody';
						$extras=' ($'.$lowestpc.')';
					}elseif($csn==45){
						$pdsql="select * from subcat where csn=8 and sn='$ssn'";
						//start: get lowest price
							$lprc = "select * from chdcat where csn=8 and ssn=$ssn and dname like 'Stable Cell Line'";
							$lprc_res = mysql_query($lprc,$db);
							$lprc_r = mysql_fetch_array($lprc_res);
							$fordsn = $lprc_r['sn'];
							$getlpc = "select * from prod_cell_lines where csn=8 and ssn=$ssn and dsn=$fordsn order by price";
							$getlpc_res = mysql_query($getlpc,$db);
							$getlpc_r = mysql_fetch_array($getlpc_res);
							
							$lowestpc = $getlpc_r['price'];
						//end: get lowest price
						
						$pre='Stable ';
						$extra=' Cell Line';
						$extras=' ($'.$lowestpc.')';
					}else{
						$pdsql="select * from subcat where csn='$csn' and sn='$ssn'";
						$extra='';
						$pre='';
						$extras='';
					}
				}
				$pdres=mysql_query($pdsql,$db);
				$pdrw=mysql_num_rows($pdres);
				if ($pdrw>0){
					$pdr=mysql_fetch_array($pdres);
					$subcatname = $pdr['sname'];
					if ($csn == 8){
						$sname = "$pre$subcatname$extras | ";
					}else{
						$sname = "$pre$subcatname$extras | ";
					}
					if ($csn == 12){
						switch ($ssn){
							case 3461:
								$sname = "$subcatname ($155.00) | ";
								break;
							case 3462:
								$sname = "$subcatname ($50.00) | ";
								break;
							case 3463:
								$sname = "$subcatname ($35.00) | ";
								break;
							case 3464:
								$sname = "$subcatname ($85.00) | ";
								break;
							case 3465:
								$sname = "$subcatname ($25.00) | ";
								break;
							case 3466:
								$sname = "$subcatname ($25.00) | ";
								break;
							case 13993:
								$sname = "$subcatname ($45.00) | ";
								break;
						}
					}
					if ($csn == 22){
						switch ($ssn){
							case 3916:
								$sname = "$subcatname ($45.00) | ";
								break;
							case 3918:
								$sname = "$subcatname ($25.00) | ";
								break;
							case 3919:
								$sname = "$subcatname ($10.00) | ";
								break;
							case 3920:
								$sname = "$subcatname ($35.00) | ";
								break;
						}
					}
					if ($csn == 19){
							//get lowest price from table prodsecondanti
							$scnd = "select price from prodsecondanti where csn = 19 and ssn = $ssn order by price";
							$scnd_res = mysql_query($scnd,$db);
							$scnd_r = mysql_fetch_array($scnd_res);
							$scnd_low = $scnd_r['price'];
							$sname = "$subcatname ($".$scnd_low.") | ";
					}
					if ($csn == 21){
						switch ($ssn){
							case 11255:
								$sname = "$subcatname ($95.00) | ";
								break;
							case 3917:
								$sname = "$subcatname ($35.00) | ";
								break;
							case 3912:
								$sname = "$subcatname ($35.00) | ";
								break;
							case 3915:
								$sname = "$subcatname ($100.00) | ";
								break;
						}
					}
					if ($csn == 14){
						switch ($ssn){
							case 3884:
								$sname = "$subcatname ($315.00) | ";
								break;
							case 3885:
								$sname = "$subcatname ($455.00) | ";
								break;
							case 13929:
								$sname = "$subcatname ($225.00) | ";
								break;
							case 13930:
								$sname = "$subcatname ($135.00) | ";
								break;
						}
					}
					if ($csn == 25){
						switch ($ssn){
							case 14052:
								$sname = "$subcatname ($175.00) | ";
								break;
							case 3934:
								$sname = "$subcatname ($10.00) | ";
								break;
						}
					}
					if ($csn == 29){
						$sname = "$subcatname ($0.00) | ";
					}
					if ($csn == 43){
						$sname = "$subcatname ($625.00) | ";
					}
					if ($csn == 45){
						switch ($ssn){
							case 4095:
								$sname = "$subcatname ($1350.00) | ";
								break;
							case 4147:
								$sname = "$subcatname ($1750.00) | ";
								break;
						}
					}
					
					$sname = strip_tags($sname);
				}
				if ($csn==44  && $ssn<>39164){
					switch ($ssn){
							case 11865: $price='$55.00';
							break;
							case 11866: $price='$165.00';
							break;
							case 11867: $price='$125.00';
							break;
					}
					$sname = "$subcatname ($price) | ";
				}
			}else{$sname='';}
			
			if (isset($dsn) && $dsn!=0){
				$pdsql="select * from chdcat where csn='$csn' and ssn='$ssn' and sn='$dsn'";
				$pdres=mysql_query($pdsql,$db);
				$pdrw=mysql_num_rows($pdres);
				if ($pdrw>0){
					$pdr=mysql_fetch_array($pdres);
					$chdcatname = $pdr['dname'];
					if ($chdcatname == "miRNA Profiling Service"){
						$chdcatname = "miRNA(microRNA) Profiling Service($330.00)";
					}
					if ($chdcatname == "Lentivirus Purification Kit"){
						$chdcatname = "Lentivirus Purification Kit ($275.00)";
					}
					if ($ssn==11838){
						$dname = "$kwd $chdcatname ($325.00) | ";
						$dname = str_replace("miRNA","miRNA/microRNA",$dname);
						$dname = str_replace("/Vector","/Lentivector",$dname);
						$dname = strip_tags($dname);
					}elseif ($ssn == 11839 && $dsn == 12256){
						$dname = "$chdcatname ($155.00) | ";
						$dname = strip_tags($dname);
					}elseif ($ssn == 11839 && $dsn == 12258){
						$dname = "$chdcatname ($100.00) | ";
						$dname = strip_tags($dname);
					}elseif ($ssn == 11839 && $dsn == 12259){
						$dname = "$chdcatname ($395.00) | ";
						$dname = strip_tags($dname);
					}elseif ($ssn == 11840 && $dsn == 12261){
						$dname = "$chdcatname ($550.00) | ";
						$dname = strip_tags($dname);
					}elseif ($ssn == 3883 && $dsn == 4018){
						$dname = "$chdcatname ($625.00) | ";
						$dname = strip_tags($dname);
					}elseif ($ssn == 3883 && $dsn == 12372){
						$dname = "$chdcatname ($275.00) | ";
						$dname = strip_tags($dname);
					}elseif ($ssn == 3885 && $dsn == 4028){
						$dname = "$chdcatname ($225.00) | ";
						$dname = strip_tags($dname);
					}else{
						$dname = "$chdcatname | ";
						$dname = strip_tags($dname);
					}
					
					if ($csn == 30 && $ssn == 11344 && $dsn == 11717){
						$dname = "$chdcatname ($725.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11344 && $dsn == 11718){
						$dname = "$chdcatname ($250.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11344 && $dsn == 11719){
						$dname = "$chdcatname ($350.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11344 && $dsn == 11721){
						$dname = "$chdcatname ($550.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11345 && $dsn == 11723){
						$dname = "$chdcatname ($355.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11345 && $dsn == 11724){
						$dname = "$chdcatname ($1350.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11346 && $dsn == 11726){
						$dname = "$chdcatname ($15.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11347 && $dsn == 11727){
						$dname = "$chdcatname ($52.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11347 && $dsn == 11728){
						$dname = "$chdcatname ($50.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11348 && $dsn == 11729){
						$dname = "$chdcatname ($95.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11348 && $dsn == 11730){
						$dname = "$chdcatname ($95.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11349 && $dsn == 11733){
						$dname = "$chdcatname ($450.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 11349 && $dsn == 11734){
						$dname = "$chdcatname ($35.00) | ";
						$dname = strip_tags($dname);
					}
					if ($csn == 30 && $ssn == 13972 && $dsn == 14453){
						$dname= "$chdcatname ($8,500.00) | ";
					}
					
					
					if($csn==8){
						$dname = " ";
					}
					if ($csn == 13 && $ssn == 3770 && $dsn == 3876){
						$dname = "$chdcatname ($125.00) | ";
					}
					if ($csn==20){
						switch ($dsn){
							case 4076: $price='$48.00';
							break;
							case 4077: $price='$48.00';
							break;
							case 4079: $price='$46.00';
							break;
							case 4075: $price='$79.00';
							break;
							case 4080: $price='$89.00';
							break;
							case 4081: $price='$36.00';
							break;
						}
						$dname = "$chdcatname ($price) | ";
					}
				}
			}else{
				$dname='';
				$chdcatname='';
			}
			if(!isset($dname)){
				$dname='';
			}
			
			if (isset($catno)){
				switch($csn){
					case 8: $data='products';
					break;
					case 9: $data='prodsirna';
					break;
					case 10: $data='prodlenti';
					break;
					case 11: $data='prodadenovirus';
					break;
					case 12: if($ssn==13993){$data='prodmarkers';
							 }elseif($dsn==11626){$data='prodbiochems';
							 }else{$data='prodpcr';
							 }
					break;
					case 13: $data='prodtrans';
					break;
					case 14: 
						if($catno=='G097'){$data='products';
						}else{$data='prodviralexp';}
					break;
					case 15: $data='prodcellimmort';
					break;
					case 16: if($ssn==3710){$data='customer_service';
							 }else{$data='prodviralexp';
							 }
					break;
					case 17: $data='products';
					break;
					case 18: $data='products';
					break;
					case 19: $data='prodsecondanti';
					break;
					case 20: $data='proddnapure';
					break;
					case 21: if($ssn==11255){$data='prodmarkers';
							 }else{$data='prodwesternblot';
							 }
						
					break;
					case 22:
						switch($ssn){
								case 3916: $data='prodmarkers';
								break;
								case 3919: $data='prodbiochems';
								break;
								case 3920: $data='prodantibiotics';
								break;
								case 3918: $data='prodpcr';
								break;	
							}
					break;
					case 23: $data='prodlysates';
					break;
					case 25: $data='custom_service';
					break;
					case 26: 
						switch($dsn){
							case 12288: 
								if(isset($report)&&$report=='stable'){$data='prod_stable_cells';
								}else{$data='mirna_validator';
								}
							break;
							case 12259: $data='prodmirnaarray';
							break;
							case 12258: $data='mirna_primers_sets';
							break;
							case 12256: $data='prodpcr';
							break;
							case 12257: $data='prodcDNAmirna';
							break;
							case 12251:
							case 12252:
							case 12253:
							case 12254:
							case 12255: 
							case 14442: $data='premade_mirna_exp';
							break;	
						}
					break;
					case 29: 
						if($catno=='G299'){$data='prod_cell_culture';
						}else{$data='prodihc';
						}
					break;
					case 30:
							switch($dsn){
								case 11717: $data='prodprotein';
								break;
								case 11718: $data='prodstemcell';
								break;
								case 11724:
								case 11719: $data='prodadenovirus';
											$extra=' Adenovirus';
								break;
								case 11721: $data='prodipscplasmid';
								break;
								case 11727: $data='prodsmallmolecule';
								break;
								case 11729:
								case 11730: $data='products';
								break;
								case 11733: $data='prod_ipsc_cells';
								break;
								case 11734: $data='prod_feeder_cell';
								break;
								case 11723: $data='prodstemcellkits';
								break;
								case 11726: $data='prod_cell_culture';
								break;
								case 11728: $data='prod_growth_factor';
								break;
							}
							if(isset($addons)&&$addons=='1'){$data='prodlysates';}
							if(isset($addons)&&$addons=='2'){$data='prod_cell_lines';}
					break;
					case 44: $data='prodproteinpure';
					break;
					case 50: $data='prod_diagnostic_kits';
					break;
					case 51: $data='prod_equipment';
					break;
					case 43: 
						if($catno=='G299'){$data='prod_cell_culture';
						}else{$data='prod_primary_cells';
						}
					break;
					case 45: $data='prod_cell_lines';
					break;
					case 53: $data='prodProteinVector';
					break;
					case 54: $data='prodORFVector';
					break;
					case 55: $data='prodprotein';
					break;
					case 56: $data='prodlysates';
					break;
					case 57: $data='prod_cell_culture';
					break;
				}
				$prd = "select * from $data where catNo like '$catno%' and catNo not like 'LV010154' and catNo not like 'LV010158' and catNo not like '000010A' and catNo not like 'G347' and catNo not like 'G349' order by catNo";
				$prd_res = mysql_query($prd,$db);
				$prd_rows = mysql_num_rows($prd_res);
				if ($prd_rows > 0){
					$pdr = mysql_fetch_array($prd_res);
					if ($catno !== 'T018'){
						$prodname = $pdr['pname'];
					}else{
						$prodname = '';
					}
					$price = $pdr['price'];
					if(!isset($extra)){$extra='';}
					if ($csn == 13){
						$ptname = "$prodname$extra ($$price) | ";
					}else{
						$ptname = "$prodname$extra ($$price) | ";
					}
					$ptname = strip_tags($ptname);
				}
			}else{$ptname = '';}
			
			if (isset($csn) && $csn == 25 && isset($ssn) && $ssn == 3929){
				echo "<title>Custom Lentivirus Production and Purification | $ptname$dname$sname$cname | abm Inc.</title>";
			}elseif (isset($csn) && $csn == 17){
				if(!isset($sname)){$sname='';}
				echo "<title>$ptname$dname$sname$cname | abm Inc.</title>";
			}elseif (isset($csn) && $csn == 9){
				echo "<title>$ptname$dname$sname | abm Inc.</title>";
			}elseif (isset($csn) && $csn == 8){
				$ptname=str_replace('Anti-','',$ptname);
				echo "<title>$ptname$dname$sname$cname | abm Inc.</title>";
			}elseif (isset($cellname) && $csn == 13){
				echo "<title>$cellname Transfection Reagents | abm Inc.</title>";
			}else{
				echo "<title>$ptname$dname$sname$cname | abm Inc.</title>";
			}
	?>
    
<meta name="author" content="Applied Biological Materials Inc." />
<meta name="generator" content="abm Inc." />
